<template>
  <div class="category-card">
    <div class="icon-circle" :style="{ backgroundColor: category.color }">
      <SvgIcon :type="category.icon" color="#fff" :size="30" />
    </div>
    <div class="category-name">{{ category.name }}</div>
  </div>
</template>

<script setup lang="ts">
import type { Category } from '@/types'

defineProps<{
  category: Category
}>()
</script>

<style scoped lang="scss">
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;

  &:hover {
    transform: translateY(-5px);

    .icon-circle {
      box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }
  }

  .icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
  }

  .category-name {
    font-size: 14px;
    color: #333;
  }
}
</style>
